import TextArea from "antd/es/input/TextArea"
import { FC } from "react"

import { SFormItem } from "@/components/common"
import { useLocale } from "@/locales"

// eslint-disable-next-line @typescript-eslint/no-unused-vars
export const RiskLevelDescriptionTextarea: FC<any> = props => {
	const { labelProps, textareaProps, name = "description" } = props
	const { formatMessage } = useLocale()
	return (
		<SFormItem
			name={name}
			label={formatMessage({ id: "label.risk_level_description" })}
			rules={[
				{
					required: true,
					message: formatMessage(
						{ id: "message.please_inter_sth" },
						{ sth: formatMessage({ id: "label.risk_level_description" }) }
					)
				}
			]}
			{...labelProps}
		>
			<TextArea
				count={{
					show: true,
					max: 50
				}}
				maxLength={50}
				{...textareaProps}
			/>
		</SFormItem>
	)
}
